<template>
    <div style="width: 100%">
        <el-time-picker v-if="!isInstanceSearch" :style="inputStyle" :disabled="isDisable" v-model="properties.bindValue"
                        :placeholder="properties.commonPlaceholder" :start-placeholder="properties.startPlaceholder"
                        :end-placeholder="properties.endPlaceholder" :is-range="properties.isRange" :arrow-control="properties.isArrowControl"/>

        <el-time-picker v-if="isInstanceSearch" :style="inputStyle" :disabled="isDisable" v-model="properties.searchValue"
                        :placeholder="properties.commonPlaceholder" :start-placeholder="properties.startPlaceholder"
                        :end-placeholder="properties.endPlaceholder" :is-range="properties.isRange" :arrow-control="properties.isArrowControl"/>
    </div>
</template>

<script setup lang="ts" name="YwuFormTime">
import {computed, defineProps} from "vue";

let props = defineProps(['isEdit', 'properties', 'isInstanceSearch', "isDisable", "formBuildList"]);

let isEdit = computed(() => {return props['isEdit']})
let properties = computed(() => {return props['properties']})
let isInstanceSearch = computed(() => {return props['isInstanceSearch']})
let isDisable = computed(() => {return props['isDisable']})
let formBuildList = computed(() => {return props['formBuildList']})

let inputStyle = computed(() => {
    if (isEdit.value) {
        return "pointer-events: none;width:100%;"
    } else {
        return "width:100%;";
    }
})
</script>

<style scoped lang="less">

</style>